from django.urls import re_path
from rest_framework.routers import SimpleRouter

from taunt.Viewset import SpitsModelViewSet
from taunt.cjz_views import SpitViewSet, SpitCommentView
from taunt.views import UpdateSpitViewSet

urlpatterns = []

router = SimpleRouter()
router.register('spit', SpitsModelViewSet, base_name='spit')

urlpatterns += router.urls

# urlpatterns = [
#     re_path(r'^spit/$', SpitViewSet.as_view({
#         'post': 'create',
#         'get': 'list'
#     })),
#
#     re_path(r'^spit/(?P<pk>\d+)/$', SpitViewSet.as_view({
#         'get': 'retrieve',
#     })),
#
#     re_path(r'^spit/(?P<id>\d+)/children/$', SpitCommentView.as_view({
#         'get': 'retrieve',
#     })),
#
#     re_path(r'^spit/(?P<pk>\d)/collect/$', UpdateSpitViewSet.as_view({
#         'put': 'update_collect'
#     })),
#
#     re_path(r'^spit/(?P<pk>\d)/updatethumbup/$', UpdateSpitViewSet.as_view({
#         'put': 'update_thumbup'}))
# ]






